package com.igeekhome.wzgl.mapper;

import com.igeekhome.wzgl.entity.MaterialInboundEntity;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface IMaterialInboundMapper {
    @Select("select * from material_inbound")
    List<MaterialInboundEntity> page();
    @Insert("insert into material_inbound(number,title,material_type,create_time,creater) values (#{number},#{title},#{materialType},#{createTime},#{creater})")
    int insert(MaterialInboundEntity mi) ;
    @Delete("delete from material_inbound where id = #{id}")
    int delete(int id);
    @Update("update material_inbound set number=#{number},title=#{title},material_type=#{materialType},create_time=#{createTime},creater=#{creater} where id = #{id}")
    int update(MaterialInboundEntity mi);
    @Select("select id,number,title,material_type,create_time,creater from material_inbound where id=#{id}")
    List<MaterialInboundEntity> select(int id);
    @Select("select id,number,title,material_type,create_time,creater from material_inbound where id=#{id}")
    MaterialInboundEntity getById(int id);
}
